package com.dgy.project.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dgy.project.mapper.ProjectMemberResearchMapper;
import com.dgy.project.domain.ProjectMemberResearch;
import com.dgy.project.service.IProjectMemberResearchService;

/**
 * 负责人和课题组主要成员近五年重要研究课题Service业务层处理
 *
 * @author ccc
 * @date 2025-03-19
 */
@Service
public class ProjectMemberResearchServiceImpl implements IProjectMemberResearchService
{
    @Autowired
    private ProjectMemberResearchMapper projectMemberResearchMapper;

    /**
     * 查询负责人和课题组主要成员近五年重要研究课题
     *
     * @param id 负责人和课题组主要成员近五年重要研究课题主键
     * @return 负责人和课题组主要成员近五年重要研究课题
     */
    @Override
    public ProjectMemberResearch selectProjectMemberResearchById(Long id)
    {
        return projectMemberResearchMapper.selectProjectMemberResearchById(id);
    }

    /**
     * 查询负责人和课题组主要成员近五年重要研究课题列表
     *
     * @param projectMemberResearch 负责人和课题组主要成员近五年重要研究课题
     * @return 负责人和课题组主要成员近五年重要研究课题
     */
    @Override
    public List<ProjectMemberResearch> selectProjectMemberResearchList(ProjectMemberResearch projectMemberResearch)
    {
        return projectMemberResearchMapper.selectProjectMemberResearchList(projectMemberResearch);
    }

    /**
     * 新增负责人和课题组主要成员近五年重要研究课题
     *
     * @param projectMemberResearch 负责人和课题组主要成员近五年重要研究课题
     * @return 结果
     */
    @Override
    public int insertProjectMemberResearch(ProjectMemberResearch projectMemberResearch)
    {
        projectMemberResearch.setCreateTime(DateUtils.getNowDate());
        return projectMemberResearchMapper.insertProjectMemberResearch(projectMemberResearch);
    }

    /**
     * 修改负责人和课题组主要成员近五年重要研究课题
     *
     * @param projectMemberResearch 负责人和课题组主要成员近五年重要研究课题
     * @return 结果
     */
    @Override
    public int updateProjectMemberResearch(ProjectMemberResearch projectMemberResearch)
    {
        projectMemberResearch.setUpdateTime(DateUtils.getNowDate());
        return projectMemberResearchMapper.updateProjectMemberResearch(projectMemberResearch);
    }

    /**
     * 批量删除负责人和课题组主要成员近五年重要研究课题
     *
     * @param ids 需要删除的负责人和课题组主要成员近五年重要研究课题主键
     * @return 结果
     */
    @Override
    public int deleteProjectMemberResearchByIds(Long[] ids)
    {
        return projectMemberResearchMapper.deleteProjectMemberResearchByIds(ids);
    }

    /**
     * 删除负责人和课题组主要成员近五年重要研究课题信息
     *
     * @param id 负责人和课题组主要成员近五年重要研究课题主键
     * @return 结果
     */
    @Override
    public int deleteProjectMemberResearchById(Long id)
    {
        return projectMemberResearchMapper.deleteProjectMemberResearchById(id);
    }
}
